
<div class="panel panel-default panel-intro">

    <div class="panel-body">
        <div class="form-group">
            <h3 class="col-sm-2 col-xs-4">工作报告统计</h3>
            <form name="search-form" role="form" method="get" data-toggle="validator"
                  class="form-horizontal " action="">
                <div class="col-sm-7 col-xs-7">
                    <div class="input-group">
                        <select name="row[type]" class="form-control" style="width: 80px;margin: 10px;font-size: 14px">
                            <option value="日报" {eq name="type" value="日报"}selected="selected"{/eq} >日报</option>
                            <option value="周报" {eq name="type" value="周报"}selected="selected"{/eq} >周报</option>
                            <option value="月报" {eq name="type" value="月报"}selected="selected"{/eq} >月报</option>
                            <option value="季报" {eq name="type" value="季报"}selected="selected"{/eq} >季报</option>
                            <option value="年报" {eq name="type" value="年报"}selected="selected"{/eq} >年报</option>
                        </select>
                        {neq name='type' value='年报'}
                        <select name="row[year]" class="form-control" style="width: 80px;margin: 10px;font-size: 14px">
                            {foreach name="years" item="val"}
                            <option value="{$val}" {eq name="year" value="$val" }selected="selected"{/eq} >
                            {$val}年</option>
                            {/foreach}
                        </select>
                        {/neq}
                        {eq name='type' value='日报'}
                        <select name="row[month]" class="form-control " style="width: 60px;margin: 10px;font-size: 14px">
                            {for start="1" end="12"}
                            <option value="{$i}" {eq name="month" value="$i" }selected="selected"{/eq}  >{$i}月</option>
                            {/for}
                        </select>
                        {/eq}

                        <select class="form-control selectpicker" name="row[group_id]"
                                data-live-search="true" style="width: 100px;margin: 10px" >
                            <option value="">全部</option>
                            {foreach name="groupdata" item="val"}
                            <option value="{$val.id}" {eq name="group_id" value="$val.id"}selected="selected"{/eq} >{$val.name}</option>
                            {/foreach}
                        </select>

                    </div>
                </div>
                <div class="col-xs-2 col-sm-2">
                    <button type="submit" class="btn btn-success" style="margin: 10px">立即搜索</button>
                </div>
            </form>
        </div>
        <div class="col-xs-12 col-sm-12">

            <div class="widget-body no-padding" style="min-height: 564px">

                <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                       width="100%">
                    <thead>
                    <tr>
                        <th>
                            员工
                        </th>
                        {eq name='type' value='日报'}
                        <th>
                            本月
                        </th>
                        <th>
                            完成率
                        </th>
                        {/eq}

                        {neq name='type' value='年报'}
                        <th>
                            本年
                        </th>
                        <th>
                            完成率
                        </th>
                        {/neq}
                        {foreach name="dates" item="val"}
                        <th  title="{$val.search}">
                            {$val.date}
                        </th>
                        {/foreach}
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="ls"}
                    <tr>
                        <td>{$ls.name}</td>

                        {eq name='type' value='日报'}
                        <td>{$ls.month}</td>
                        <td>{$ls.month_ratio}%</td>
                        {/eq}

                        {neq name='type' value='年报'}
                        <td>{$ls.year}</td>
                        <td>{$ls.year_ratio}%</td>
                        {/neq}
                        {foreach name="dates" item="val"}
                        <td >
                            {eq name="$ls[$val['date']]" value="1"}
                            <a href="qingdongams/report/daily/index?type={$type}&createtime={$val.search}&staff_id={$ls.id}" class="btn-dialog" data-title="工作报告"><i class="fa fa-check text-success"></i></a>
                            {else/}
                                {eq name="$ls[$val['date']]" value="9"}
                                -
                                {else/}
                                <i class="fa fa-remove text-red"></i>
                                {/eq}
                            {/eq}
                        </td>
                        {/foreach}
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

